package com.cw.mp.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

@Getter
public enum UserStatus {
    NORMAL(1,"正常"),
    FROZEN(2,"异常");

    @EnumValue
    private final int value;
    @JsonValue // 加入该注解返回desc而不是value(NORMAL/FROZEN)
    private final String desc;

    UserStatus(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }
}
